package com.soundnet.androidhelper.bean;

import android.graphics.Bitmap;

import com.amap.api.maps2d.model.BitmapDescriptor;
import com.amap.api.maps2d.model.BitmapDescriptorFactory;

/**
 * Created by Allen-Lan on 2015/8/7.
 */
public class CustomMarkerOptions {
    private String mTitle;
    private double mLatitude;
    private double mLongitude;
    private float mAnchor_x;
    private float mAnchor_y;
    private boolean mDraggable = true;
    private int mIconResourceId;
    private Bitmap mIconBitmap;
    private int mIndex = 0;
    private boolean mFixed = false;

    public String getmTitle() {
        return mTitle;
    }

    public void setmTitle(String mTitle) {
        this.mTitle = mTitle;
    }

    public double getmLongitude() {
        return mLongitude;
    }

    public void setmLongitude(double mLongitude) {
        this.mLongitude = mLongitude;
    }

    public float getmAnchor_x() {
        return mAnchor_x;
    }

    public void setmAnchor_x(float mAnchor_x) {
        this.mAnchor_x = mAnchor_x;
    }

    public float getmAnchor_y() {
        return mAnchor_y;
    }

    public void setmAnchor_y(float mAnchor_y) {
        this.mAnchor_y = mAnchor_y;
    }

    public boolean ismDraggable() {
        return mDraggable;
    }

    public void setmDraggable(boolean mDraggable) {
        this.mDraggable = mDraggable;
    }

    public int getmIconResourceId() {
        return mIconResourceId;
    }

    public void setmIconResourceId(int mIconResourceId) {
        this.mIconResourceId = mIconResourceId;
    }

    public double getmLatitude() {

        return mLatitude;
    }

    public void setmLatitude(double mLatitude) {
        this.mLatitude = mLatitude;
    }

    public boolean ismFixed() {
        return mFixed;
    }

    public void setmFixed(boolean mFixed) {
        this.mFixed = mFixed;
    }

    public int getmIndex() {
        return mIndex;
    }

    public void setmIndex(int mIndex) {
        this.mIndex = mIndex;
    }

    public void setmIconBitmap(Bitmap mIconBitmap) {
        this.mIconBitmap = mIconBitmap;
    }

    public BitmapDescriptor getmIconBitmap() {
        if (null != mIconBitmap) {
            return BitmapDescriptorFactory
                    .fromBitmap(mIconBitmap);
        }
        else {
            return BitmapDescriptorFactory
                    .fromResource(mIconResourceId);
        }
    }

    @Override
    public String toString() {
        return "CustomMarkerOptions{" +
                "mTitle='" + mTitle + '\'' +
                ", mLatitude=" + mLatitude +
                ", mLongitude=" + mLongitude +
                ", mAnchor_x=" + mAnchor_x +
                ", mAnchor_y=" + mAnchor_y +
                ", mDraggable=" + mDraggable +
                ", mIconResourceId=" + mIconResourceId +
                ", mIconBitmap=" + mIconBitmap +
                ", mIndex=" + mIndex +
                ", mFixed=" + mFixed +
                '}';
    }
}
